package com.spe.shangcheng.search.crontroller;

/**
 * @author ：spe
 * @description：TODO
 * @date ：2024/11/25 20:42
 */
import lombok.Builder;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

import org.springframework.data.elasticsearch.annotations.FieldType;


@Data
@Builder
// 这个注解要加上，不然会报索引名必须小写，默认是类名，也就是Product
@Document(indexName = "product")
public class Product {

    @Id
//    @Field(type = FieldType.Long)
    private Long id;

//    @Field(type =FieldType.Text )
    private String name;

//    @Field(type = FieldType.Double)
    private Integer price;

//    @Field(type = FieldType.Nested)
    private String description;

}